//
//  MFWSdk.h
//  MFWSdk
//  Version 0.2.0
//
//  Created by Song Xiaofeng on 13-7-23.
//  Copyright (c) 2013年 Mafengwo Inc. All rights reserved.
//

/**********************************************************
 *
 * Version     |   Date        |  Author   |   Comments
 *  20130811    |   2013-7-23   | Xiaofeng  | Initial
 *  20131018    |   2013-10-18  | Xiaofeng  | 增加打patch的机制
 *
 **********************************************************/

#import <Foundation/Foundation.h>
//#import <MFWSdk/Commons/MFWEventHandlerDefine.h>
#import "MFWEventHandlerDefine.h"
#import "MFWShareTypeDef.h"

@class MFWClientConfig;
@interface MFWSdk : NSObject

+ (NSString*)sdkVersion;

+ (void)appDidLaunched:(NSDictionary*)launchOptions;
+ (void)appDidLaunched:(NSDictionary *)launchOptions withConfiguration:(MFWClientConfig*)clientConfig;

+ (void)registerPushDeviceToken:(NSData*)deviceToken;
+ (void)processRemoteNotificationWithCommand:(NSDictionary *)remoteNotification fromLaunch:(BOOL)bFromLaunch;

//+ (void)forcePatchEnd;
//+ (void)testReStart;

/**
 *	退出登陆
 */
+ (void)accountLogout;

/**
 *	蚂蜂窝帐号登陆
 *
 *	@param	account	账号
 *	@param	password	密码
 *	@param	handler	回调
 *
 *	@return	是否成功发出请求
 */
+ (BOOL)accountLoginWithAccount:(NSString*)account password:(NSString*)password resultHandler:(UserLoginFinished)handler;

/**
 *	第三方登陆
 *
 *	@param	thirdPartType	类型, 微信登录用 MFWShareTypeWeixiSession
 *	@param	handler	回调
 *
 *	@return	是否可以正常登陆（是否支持指定的平台来登陆）
 */
+ (BOOL)loginWith3rdPart:(MFWShareType)thirdPartType startBind:(void(^)())startBindBlock resultHandler:(UserLoginFinished)handler;

/**
 *	注册，成功后当作登陆成功
 *
 *	@param	emailAccount	帐号
 *	@param	password 密码
 *	@param	handler	回调
 *
 *	@return	是否成功发出请求
 */
+ (BOOL)accountRegister:(NSString*)emailAccount password:(NSString*)password nickName:(NSString*)nickName resultHandler:(UserRegisterFinished)handler;
@end
